package com.ms.oschina.ui.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import com.ms.oschina.R;
import com.ms.oschina.util.HandlerUtils;

public class SplashActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_splash);

		initData();
	}

	private void initData() {
		HandlerUtils.postTaskDelay(new Runnable() {
			@Override
			public void run() {
				redirectTo();
			}
		}, 2000);
	}

	private void redirectTo() {
		Intent intent = new Intent(this, HomeActivity.class);
		startActivity(intent);
		finish();
	}

}
